//
// Created by Administrator on 2023/6/3.
//


#include "../header/Table_Menu.h"


Analysis_Menu_Button::Analysis_Menu_Button(): QPushButton()
    , analysis_Menu(new QMenu()), descriptive(new QAction())
{
    this->Profile();
}


Analysis_Menu_Button::~Analysis_Menu_Button()
{
    delete analysis_Menu, descriptive;
}


void Analysis_Menu_Button::Profile()
{
    this->resize(100, 20);
    this->setText("分析");
    this->analysis_Menu->addAction(this->descriptive);
    this->setMenu(this->analysis_Menu);

    this->descriptive->setText(QString("描述性统计"));
}



Visual_Menu_Button::Visual_Menu_Button(): QPushButton()
    , visual_menu(new QMenu()), bar_chart(new QAction())
    , scatter_plot(new QAction()), line_chart(new QAction)
{
    this->Profile();
}


Visual_Menu_Button::~Visual_Menu_Button()
{
    delete visual_menu, bar_chart, scatter_plot, line_chart;
}


void Visual_Menu_Button::Profile()
{
    this->resize(100, 20);
    this->setText("可视化");
    this->visual_menu->addAction(bar_chart);
    this->visual_menu->addAction(scatter_plot);
    this->visual_menu->addAction(line_chart);
    this->setMenu(this->visual_menu);


    this->bar_chart->setText(QString("条形图"));
    this->scatter_plot->setText(QString("散点图"));
    this->line_chart->setText(QString("折线图"));
}